package com.ucap.weking.guangan.fragments.fragmentContent;

import android.view.LayoutInflater;
import android.view.View;
import android.widget.LinearLayout;

import com.ucap.weking.guangan.R;
import com.ucap.weking.guangan.base.BaseFragment;
import com.ucap.weking.guangan.dataUri.DataUri;
import com.ucap.weking.guangan.dialog.ListDialog;

import butterknife.ButterKnife;
import butterknife.InjectViews;

/**
 * Created by weking on 2017/10/23.
 */

public class HomeContent2Company extends BaseFragment implements View.OnClickListener {

    @InjectViews({R.id.ll_company_1, R.id.ll_company_2, R.id.ll_company_3, R.id.ll_company_4, R.id.ll_company_5, R.id.ll_company_6, R.id.ll_company_7})
    LinearLayout[] itemCompany;

    @Override
    public void setData() {
        for (int i = 0; i < itemCompany.length; i++) {
            itemCompany[i].setOnClickListener(this);
        }
    }

    @Override
    public void intiView() {
        View inflate = LayoutInflater.from(getContext()).inflate(R.layout.home_content2_company, null);
        flContent.addView(inflate);
        ButterKnife.inject(this, inflate);

    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.ll_company_1:
                ListDialog.showDialog(getContext(), getActivity(), "市政府部门", DataUri.getSHI_ZHENG_BUM_MEN());
                break;
            case R.id.ll_company_2:
                ListDialog.showDialog(getContext(), getActivity(), "市政府直属事业单位", DataUri.getSHI_ZHENG_ZHI_SHU_DAN_WEI());
                break;
            case R.id.ll_company_3:
                ListDialog.showDialog(getContext(), getActivity(), "市属国有企业", DataUri.getSHI_ZHENG_GUO_YOU_QI_YE());
                break;
            case R.id.ll_company_4:
                ListDialog.showDialog(getContext(), getActivity(), "中省驻市单位", DataUri.getZHONG_SHENG_ZHU_SHI_DAN_WEI());
                break;
            case R.id.ll_company_5:
                ListDialog.showDialog(getContext(), getActivity(), "园区管委会", DataUri.getYUAN_QU_GUAN_WEI_HUI());
                break;
            case R.id.ll_company_6:
                ListDialog.showDialog(getContext(), getActivity(), "区市县人民政府", DataUri.getREN_MIN_ZHENG_FU());
                break;
            case R.id.ll_company_7:
                ListDialog.showDialog(getContext(), getActivity(), "其他", DataUri.getQI_TA());
                break;

        }
    }
}
